package com.asy.ui.base;

import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.xinzhang.R;
public class UserViewCache {

	 private View baseView;  
     private ImageView imageView;  
     private TextView textView;
     private int width;
     
     public UserViewCache(View baseView) {  
         this.baseView = baseView;  
     }  

     public TextView getTextView() {  
         if (textView == null) {  
             textView = (TextView) baseView.findViewById(R.id.txt_user_name);  
         }  
         return textView;  
     }  

     public ImageView getImageView() {  
         if (imageView == null) {  
             imageView = (ImageView) baseView.findViewById(R.id.user_image);  
             LinearLayout.LayoutParams topLayoutParams=new LinearLayout.LayoutParams(width,width);
             imageView.setLayoutParams(topLayoutParams);
         }  
         return imageView;  
     }
 	
	 public void setWidth(int width) {
			this.width = width;
	 }  
}
